Conventionally, compression of information representing the attribute of each pixel which forms an image, i.e., so-called attribute information uses lossless coding so as not to change the attribute information. However, the compression ratio of lossless coding changes depending on the contents of data to be coded (in this case, attribute information). In an application of lossless coding, it is difficult to control the coded data amount.
In this situation, as a method of controlling the code amount of attribute information, there has conventionally been disclosed a technique of suppressing variations in attribute information to decrease the number of types of information, and thereby increasing the coding efficiency in compressing the attribute information.
According to the prior art, however, when coded data of attribute information does not fall within a target data amount, the information is changed to preset attribute information, and the meaning of the changed attribute information greatly deviates from the original one, degrading the image quality in a subsequent image process and the like.